package zc.cennavi.taxi;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.umeng.analytics.MobclickAgent;


public class Navi extends Activity
{
	private int mIdx = 0 ;
	private RelativeLayout mLLBK = null;
	
	ImageView dot1;
	ImageView dot2;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
		super.onCreate(savedInstanceState);
		Log.i("test","...i.Navi.onCreate");
        setContentView(R.layout.navi);     
    	
        mLLBK = (RelativeLayout)findViewById(R.id.navi_ll);
        dot1 = (ImageView)findViewById(R.id.navi_dot1);
        dot2 = (ImageView)findViewById(R.id.navi_dot2);
        
        
        
        mLLBK.setBackgroundResource(R.drawable.navi0);
        dot1.setAlpha(100);
		dot2.setAlpha(255);
        
        mIdx =0 ;        
    }

	@Override
	public boolean onTouchEvent(MotionEvent event)
	{
		if (event.getAction() == MotionEvent.ACTION_UP ) 
		{
			switch ( mIdx )
			{
			case 0:
		        mLLBK.setBackgroundResource(R.drawable.navi1);
		        dot1.setAlpha(255);
				dot2.setAlpha(100);
				break;
			default:
			    finish();
				break;
			}
			mIdx++;
		}
		else
		{
			return super.onTouchEvent (event) ;
		}
		
	    return true;
	}

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
	}

	 @Override
		public void onResume() 
		{
		    super.onResume();
		    MobclickAgent.onResume(this);
		}
		
	    @Override
		public void onPause() 
		{
		    super.onPause();
		    MobclickAgent.onPause(this);
		}
	
}
